/*
 * Main.fx
 *
 * Created on 17-abr-2011, 15:47:55
 */

package jdownloaderremote;

/**
 * @author erodrig
 */
public class Main {

    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:main
    public-read def treeView: com.javafx.preview.control.TreeView = com.javafx.preview.control.TreeView {
        cellFactory: treeCellFactory
    }
    
    public-read def scene: javafx.scene.Scene = javafx.scene.Scene {
        content: getDesignRootNodes ()
    }
    
    public-read def httpdataSource: org.netbeans.javafx.datasrc.HttpDataSource = org.netbeans.javafx.datasrc.HttpDataSource {
        url: "http://192.168.0.111:9999/get/downloads/currentlist"
        parser: org.netbeans.javafx.datasrc.Parsers.XML_PARSER
    }
    
    public-read def currentState: org.netbeans.javafx.design.DesignState = org.netbeans.javafx.design.DesignState {
    }
    
    function treeCellFactory(): com.javafx.preview.control.TreeCell {
        var treeCell: com.javafx.preview.control.TreeCell;
        
        def label: javafx.scene.control.Label = javafx.scene.control.Label {
            visible: bind not treeCell.empty
            text: bind "{treeCell.item}"
        }
        
        treeCell = com.javafx.preview.control.TreeCell {
            node: label
        }
        
        return treeCell
    }
    
    public function getDesignRootNodes (): javafx.scene.Node[] {
        [ treeView, ]
    }
    
    public function getDesignScene (): javafx.scene.Scene {
        scene
    }
    // </editor-fold>//GEN-END:main

}

function run (): Void {
    var design = Main {};

    javafx.stage.Stage {
        title: "Main"
        scene: design.getDesignScene ()
    }
}
